{extend name="default/base" /}
{block name="css"}
<link href="__STATIC__/plugins/validator/jquery.validator.css?v={$v}" rel="stylesheet">
{/block}
{block name="main"}
<form name="editForm"  id="editForm" autocomplete="off">
    <table class='wst-form wst-box-top'>
        <tr>
          <th width="100">用户名<font color='red'>*</font>：</th>
          <td class="uinfo">
            <input type="hidden" id="token" value='{:WSTConf("CONF.pwdModulusKey")}'/>
            <input type='hidden' id='id' name='id' class="ipt" value='0' />
            <input id="loginName" name="loginName" class="ipt wst-regist-input" tabindex="1" maxlength="30" autocomplete="off" onpaste="return false;" style="ime-mode:disabled;" placeholder="邮箱/用户名/手机号" data-rule='请输入用户名:required;'  type="text" onkeyup="javascript:WST.isChinese(this,1)"/>
          </td>
        </tr>
        <tr>
          <th>密码<font color='red'>*</font>：</th>
          <td class="uinfo">
            <input id="loginPwd" name="loginPwd" class="ipt wst-regist-input" tabindex="2" style="ime-mode:disabled;" autocomplete="off" type="password" placeholder="6-16位字符" data-rule='请输入密码:required;'/>
          </td>
        </tr>
       <tr>
          <th>确认密码<font color='red'>*</font>：</th>
          <td class="uinfo">
            <input id="reUserPwd" name="reUserPwd" class="ipt wst-regist-input" tabindex="3" autocomplete="off" type="password" placeholder="6-16位字符" data-rule="确认密码: required; match(loginPwd)"/>
          </td>
        </tr>
        <tr>
          <th>角色<font color='red'>*</font>：</th>
          <td>
            <select id="roleId" data-rule="required" class="ipt" style='margin-left:2px'>
              <option value="">请选择角色</option>
              {volist name="roles" id="role"}
              <option value="{$role['id']}">{$role["roleName"]}</option>
              {/volist}
            </select>
          </td>
        </tr>
        <tr>
           <td colspan='2' class='wst-bottombar'>
              <button type="button" class="btn btn-primary btn-mright" onclick="javascript:add({$p})"><i class="fa fa-check"></i>保&nbsp;存</button>
              <button type="button" class="btn" onclick="javascript:location.href='{:Url(\'shop/shopusers/index\',\'p=\'.$p)}'"><i class="fa fa-angle-double-left"></i>返&nbsp;回</button>
           </td>
        </tr>
    </table>
</form>
{/block}  

{block name="js"}
<script type="text/javascript" src="__STATIC__/js/rsa.js"></script>
<script type='text/javascript' src='__SHOP__/shopusers/shopusers.js?v={$v}'></script>
<script type="text/javascript" src="__STATIC__/plugins/validator/jquery.validator.min.js?v={$v}"></script>
{/block}